
//
//  InviteFriendsToJoinViewController.swift
//  OnceNectar
//
//  Created by 法正磊 on 2018/2/27.
//  Copyright © 2018年 com.inwhoop. All rights reserved.
//

import UIKit
import QRCode
class InviteFriendsToJoinViewController: BaseViewController, BottomShadow, AddCornerUIRectCorner {
    @IBOutlet weak var headerView: UIView!
    @IBOutlet weak var centerView: UIView!
    @IBOutlet weak var qrImageView: UIImageView!
    @IBOutlet weak var bottomButton: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        setUI()
        // Do any additional setup after loading the view.
    }
    
    func setUI() {
        titleLabel(text: "邀请好友加入", nil)
        setShadow(view: headerView, opacity: bottomShadowOpacity, size: bottomShadowOffset, color: UIColor.black, cornerradius: CORNERRADIUS)
        setShadow(view: centerView, opacity: bottomShadowOpacity, size: bottomShadowOffset, color: UIColor.black, cornerradius: CORNERRADIUS)
        addCornerWithView(aView: bottomButton, aCorners: [.bottomLeft, .bottomRight], aSize: CGSize(width: CORNERRADIUS, height: CORNERRADIUS))
    }
    
    func setQRcode() {
        let url = URL(string: "http://www.baidu.com")!
        let qrCode = QRCode(url)
        qrImageView.image = qrCode?.image
    }
    
    override func setNavigation() {
    }
    
    @IBAction func headerTap(_ sender: UITapGestureRecognizer) {
        CustomShowAlertView().show(title: "添加成功", showTime: 2) {
            self.navigationController?.popViewController(animated: true)
        }
    }
    
}
